<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加资源</title>
<script type="text/javascript" src="/j-tool/jquery.js"></script>
<script src="/libs/editor/kindeditor-min.js" type="text/javascript"></script>
<link href='/public/css/admins.css' rel='stylesheet' type='text/css'/>
<script type="text/javascript">
	var editor;
	KindEditor.ready(function(K) {
		editor = K.create('textarea[name="content"]', {
			allowFileManager : true
		});		
	});
</script>
<body>
	<div class='bread'>资源管理-><!--{if $article}-->修改<!--{else}-->添加<!--{/if}--></div>
	<div class="formBox">
		<form method="post" name="psource" action="" enctype="multipart/form-data"> 
			<table class="table-form">
				<tr>
					<td>标题：</td><td><input type="text" name="title" class="input-text" value="<!--{$article.title}-->"/></td>
				</tr>
				<tr>
					<td>作者：</td><td><input type="text" name="author" class="input-text" value="<!--{$article.author}-->"/></td>
				</tr>
				<tr>
					<td>描述：</td><td><textarea type="text" name="descrption" id="descrption"><!--{$article.description}--></textarea></td>
				</tr>
				<tr>
					<td>分类：</td>
					<td>
						<div id="sel" class="type-select">
							<div class="sel-box-value">
								<input type="hidden" name="cates" id="cates" value="<!--{$article.cates}-->">
								<input type="text" name="sele-text" id="sele-text" value="<!--{$article.catename}-->"><span class="sel-box-btn">搜索</span>
							</div>
							<ul>
							<!--{foreach from=$catename item=val}-->
								<li data="<!--{$val.cates}-->"><!--{$val.catename}--></li>
							<!--{/foreach}-->
							</ul>							
						</div>	
					</td>
				</tr>
				<tr>
					<td>标签：</td>
					<td>
					<!--{foreach from=$tages item=val key=key}-->
						<input type="checkbox" name="tage[]" value="<!--{$key}-->" <!--{if in_array($key,$article.tage)}-->checked<!--{/if}-->><!--{$val}-->
					<!--{/foreach}-->
					</td>
				</tr>
				<tr>
					<td>封面图：</td>
					<td>
						<div class="img-input">
							<input type="file" name="photo" id="photo"/>
							<input type="text" name="faceimg" value="<!--{$article.faceimg}-->" class="file-path"/><span>&nbsp;浏览...</span>
						</div>
						<div id="imgbox"><!--{if $article.faceimg}--><img src="<!--{$article.faceimg}-->"/><!--{/if}--></div>
					</td>
				</tr>
				<tr>
					<td>正文：</td>
					<td>
						<textarea type="text" name="content" style="width:670px;height:450px;"><!--{$article.content}--></textarea>
						<!--{if $article.id}--><input type="hidden" name="id" value="<!--{$article.id}-->"/><!--{/if}-->
					</td>
				</tr>
				<tr>
					<td>上线时间：</td><td><input type="text" name="playdate" value="<!--{$article.addtime|date_format:'%Y-%m-%d %H:%M:%S'}-->" class="input-text"/></td>
				</tr>
				<tr>
					<td></td><td><input type="submit" value="提交" class="butt"/>&nbsp;&nbsp;&nbsp;<input type="reset" value="重置" class="butt"/></td>
				</tr>
			</table>
		</form>
	</div>
</body>
<script type="text/javascript" src="/j-tool/admins.js"></script>
<!--{if $notice == 1}--><script>alert("提交成功！");</script><!--{/if}-->
</html>